package me.leiusual.sharing.api.model

import me.leiusual.sharing.util.extension.toAny

/**
 * author: leiusual
 * create on: 2019-08-11
 * description:
 */
class OrderLogistics {

  class Response {

    companion object {
      fun toRealLogistics(response: String): RealLogistics? {
        return response.toAny()
      }
    }

    data class RealLogistics(
        val EBusinessID: String, // 用户ID
        val OrderCode: String?, // 订单编号
        val ShipperCode: String, // 快递公司编码
        val LogisticCode: String?, // 物流运单号
        val Success: Boolean, // 成功与否
        val Reason: String?, // 失败原因
        val State: String, // 物流状态：2-在途中,3-签收,4-问题件
        val Traces: List<Data>
    ) {

      data class Data(
          val AcceptTime: String, // 时间
          val AcceptStation: String, // 描述
          val Remark: String? // 备注
      )
    }
  }
}